package com.hunan.api.catv.entity.enums;

/**
 * 点赞操作
 */
public enum LikeType {

    cancleLike(0, "取消点赞"),

    like(1, "点赞");


    private final Integer code;

    private final String msg;


    LikeType(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static LikeType getResult(int code) {
        LikeType[] rcs = LikeType.values();
        for (LikeType rc : rcs) {
            if (rc.getCode() == code) {
                return rc;
            }
        }
        return null;
    }
}
